/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package editor;

import java.awt.event.ActionEvent;
import javax.swing.JFrame;

/**
 *
 * @author emmanuel
 */

public class EditToolBar extends GLDToolBar
{
	protected static final int TOTAL = APPBUTTON;
	protected static final int MOVE = APPBUTTON + 1;
	protected static final int NODE = APPBUTTON + 2;
	protected static final int ROAD = APPBUTTON + 3;
	protected static final int LANE = APPBUTTON + 4;

	public EditToolBar(JFrame ec) {
		super(ec, true);
	}
	
	protected void addTools() {
//  	addButton("gld/images/total.gif", this, TOTAL);
//		addButton("gld/images/move.gif", this, MOVE);
  	addButton("/images/node.gif", this, NODE);
  	addButton("/images/road.gif", this, ROAD);
  	addButton("/images/drivelane.gif", this, LANE);
	}

    @Override
	public void actionPerformed(ActionEvent e) {
		super.actionPerformed(e);
		int Id = ((IconButton)e.getSource()).getId();
		switch (Id) {
		/*	case TOTAL : { controller.changeTool(new TotalEditTool((EditController)controller)); break; }
			case MOVE  : { controller.changeTool(new MoveTool((EditController)controller)); break; }
			case NODE  : { controller.changeTool(new NodeTool((EditController)controller)); break; }
			case ROAD  : { controller.changeTool(new RoadTool((EditController)controller)); break; }
			case LANE  : { controller.changeTool(new LaneTool((EditController)controller)); break; }
		*/}
	}
}
